package com.mg.game.content.tasksscreen;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.view.MotionEvent;

import com.mg.framework.kernel.Actor;
import com.mg.framework.kernel.Screen;
import com.mg.framework.kernel.Touchable;

public class Left extends Actor implements Touchable{

	public Left(Screen screen, Bitmap bitmap) {
		super(screen, bitmap);
		this.setWidthAndHeight(60, 40);
		this.setY(this.screen.height - 50);
		this.setX(this.screen.width / 2 - 30 - this.width);
	}

	@Override
	public void gameUpdate() {
		// TODO Auto-generated method stub

	}

	@Override
	public void screenUpdate(Canvas canvas) {
		this.drawSelf(canvas, null);
	}

	@Override
	public void onTouchEvent(MotionEvent event) {
		switch (event.getAction()) {
		case MotionEvent.ACTION_DOWN:
			((TasksScreen)this.screen).setStartIndexAndEndIndex(-15);
			break;
		}
	}

	@Override
	public boolean isTouched(MotionEvent event) {
		return this.defaultIsTouched(event);
	}

}
